export const to = (promiseA) => {
  const promiseB = promiseA.then(
    (res) => {
      return [null, res]
    }
  ).catch(err => {
    return [err, null]
  })
  return promiseB
}

